package abstract_factory;

public class BreadFactory extends AbstractFactory{

    @Override
    public Car getAutomobileFactoryBrand(String automobileManufacturer) {
        return null;
    }

    @Override
    public Bread getBreadFactoryBrand(String breadManufacturer) {
        //面包厂注册了一堆面包厂商的品牌，以不同的品牌名来区分并且联系他们。
        if(breadManufacturer.equals("DaLiYuan")){
            return new DaLiYuan();
        }else if (breadManufacturer.equals("HaoShi")){
            return new HaoShi();
        }
        return null;
    }
}
